package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("t_incar")
public class InCarBean {
    @TableId(value = "pk_icId",type = IdType.AUTO)
    private Integer id;
    @TableField("ic_price")
    private Integer price =0;
    @TableField("ic_num")
    private Integer  num=0;
    @TableField("fk_userId")
    private Integer userId;
    @TableField("fk_productId")
    private Integer productId;
    @TableField(exist = false)
    private StorageBean storageBean;

    public InCarBean() {
    }

    public InCarBean(Integer price, Integer num, Integer userId, Integer productId) {
        this.price = price;
        this.num = num;
        this.userId = userId;
        this.productId = productId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public StorageBean getProductBean() {
        return storageBean;
    }

    public void setProductBean(StorageBean storageBean) {
        this.storageBean = storageBean;
    }

    @Override
    public String toString() {
        return "InCarBean{" +
                "id=" + id +
                ", price=" + price +
                ", num=" + num +
                ", userId=" + userId +
                ", productId=" + productId +
                ", storageBean=" + storageBean +
                '}';
    }
}
